home *** CD-ROM | disk | FTP | other *** search
-
- A full featured Public Domain Make for the Atari Sts. Adapted
- from origonal posting by Neil Russell.
-
- After unsharing the 3 parts of this posting you should end up
- with the following files:
-
- Sources:
-
- astat.h h.h main.c rules.c
- check.c input.c make.c ststuff.c
- decl.h macro.c reader.c touch.c
-
- Alcyon C compile scripts (you only need these the first time around!):
- compile.sh
- link.sh
- lnk
-
- Megamax C compiler scripts (you only need these the first time around!):
- mmcomp.sh
- mmlink.sh
-
- Makefiles for make:
- makefile - Alcyon C flavor
- makefile.mmc - Megamax C flavor
-
- Touch:
- compiling & linking touch.c will reult in a touch program. touch
- updates the mod. time of a file to present.
- Usage: touch file file ......
-
- #define the symbol MEGAMAX at the top of touch.c is you are
- going to compile touch using the Megamax C compiler.
-
- Docs: (well sort of)
- readme
- read.mee
-
-
- Atari ST specific Information:
-
- ATARI SPECIAL MACROS:
-
- Since the Atari St does not have any standard shell, I have built in
- three macros that are useful:
-
- $(RM) - removes one or more files, Wild Cards Allowed
- $(CP) - copies one file to another. NO directories allowed,
- will only accept two arguments, both of which
- must be files. If the destination file exists, it
- will be overwritten.
- $(ECHO) - echo's its arguements.
-
- All atari special commands internally begin with the character '%'
- and are handled by routines in ststuff.c. It should be trivial to
- add other Atari Special commands if you so desire. All other
- commands are executed using the Pexec gemdos command, so complete
- path names must be used.
-
- CONTINUATION LINES:
-
- The line continuation character is '\'. Back slashes may appear in
- pathname, but NOT at the end of a line, as it will be taken as a continuation
- backslash, and not as a part of the pathname. This should not create any big
- problem as far as i can see.
-
-
- DEFAULT RULES:
-
- See the file RULES.C. I have built in default rules for '.c.o'
- for both Alcyon C and Megamax C. But since both use the same '.o' suffix,
- only one may be built into the version of make that you compile. Which
- version gets built into make depends on the Pre Processor symbol
- 'MEGRULES'. If this symbol is defined (see H.H) then Megamax rules get
- built in. If it is not, then Alcyon rules get built in. All the rules
- are based on values of macros defined in RULES.C. These macros may be
- redefined in a makefile, and when the default rule is expanded by make
- at runtime, the new redefined values will be used instead. Note that the default
- rule may not be redefined in a makefile. Make will give an error. The only
- way to redefine the default rule is to edit RULES.C and recompile and link.
- The values i have used in RULES.C are relevant for our setup. You will
- probably want to edit them for your setup. The default rules in RULES.C are
- as follows:
-
- .SUFFIXES: .prg .68k .o .bin .s .c .pas
-
- Alcyon C defult rules (if MEGRULES is not defined):
- /* Alcyon C and AS68 rules */
-
- /* Path to the Alcyon C executables */
- setmacro("CPATH","c:\\bin");
-
- /* C preprocessor */
- setmacro("CP68", "cp68.prg");
- /* C preprocessor flags */
- setmacro("CPFLAGS", "-i c:\\include\\");
-
- /* Pass 1 of the C compiler */
- setmacro("C068", "c068.prg");
- /* Pass 1 flags */
- setmacro("C0FLAGS", "-f"); /* change to "" if you want to use IEEE
- * floating point and libm instead of libf
- * by Default. Otherwise simply redefine
- * C0FLAGS in your makefile to get the
- * IEEE floating option.
- */
-
- /* Pass 2 of the C compiler */
- setmacro("C168","c168.prg");
- /* Pass 2 flags */
- /* setmacro("C1FLAGS", ""); */ /* Save ourselves some space */
-
- /* Assembler */
- setmacro("AS","as68.prg");
- /* Assembler flags */
- setmacro("ASFLAGS","-l -u -s c:\\bin\\");
-
- .c.o:
- $(CPATH)\$(CP68) $(CPFLAGS) $< $*.i
- $(CPATH)\$(C068) $*.i $*.1 $*.2 $*.3 $(C0FLAGS)
- $(RM) $*.i
- $(CPATH)\$(C168) $*.1 $*.2 $*.s $(C1FLAGS)
- $(RM) $*.1 $*.2
- $(CPATH)\$(AS) $(ASFLAGS) $*.s
- $(RM) $*.s
-
- .s.o:
- $(CPATH)\$(AS) $(ASFLAGS) $<
-
- /* Linker of choice */
- setmacro("LINKER", "c:\\bin\\link68.prg");
-
- /* Relmod */
- setmacro("RELMOD", "c:\\bin\\relmod.prg");
-
-
- Megamax C default rules (if MEGRULES is defined):
-
- /* Megamax C Rules default */
-
- /* Path to the Megamax C executables */
- setmacro("CPATH","c:\\bin");
-
- /* C Compiler */
- setmacro("MMCC", "mmcc.ttp");
-
- /* Code Optimizer */
- setmacro("MMIMP","mmimp.ttp");
-
- .c.o:
- $(CPATH)\$(MMCC) $<
- $(CPATH)\$(MMIMP) $*.o
-
- /* Linker of choice */
- setmacro("LINKER", "$(CPATH)\\mmlink.ttp");
-
- I have not defined any default '.pas.bin' rule for Oss Pascal, but
- that should be easy to add.
-
-
- How to Compile Make:
-
- Edit the file H.H. If you want to use the Megamax C compiler
- uncomment the line /* #define MEGAMAX */ to define the symbol 'MEGAMAX'. If
- you are using the Alcyon C compiler, leave the line commented out. Edit the
- file RULES.C and the symbol 'MEGRULES' in H.H for your taste. If you have
- the beckmeyer C shell and my version of CC (posted to the net long ago) then
- you may use the shell scripts
- compile.sh and link.sh - for Alcyon C
- or
- mmcomp.sh and mmlink.sh - for Megamax C
-
- If you don't have CC or microCshell, then you will have to use these scripts
- as guideline.
-
- Once make.prg is made, you can safely throw away all the shell scripts!!
- If you intend to use make from the desktop, rename it to make.ttp.
-
-
- This program is fully in the Public Domain, and you are encouraged
- to distribute copies of the program. Your comments/criticisms/fixes etc.
- will be very much appreciated. I am however not responsible for any bugs
- and/or correctness of behavior of the program. No part of this distribution may
- be used for commercial gains.
-
- Send your comments to:
-
- Jwahar R. Bammi
- Usenet: .....!decvax!cwruecmp!bammi
- CSnet: bammi@case
- Arpa: bammi%case@csnet-relay
- CompuServe: 71515,155
-
-